import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { ActionDto } from "src/dtos/action.dto";

@Entity()
export class UserBehavior {
  @PrimaryGeneratedColumn()
  id: number;

  @Column()
  userId: number;

  @Column()
  name: string;

  @Column({
    default: 'personal',
  })
  type: 'personal';

  @Column({
    nullable: true,
  })
  description: string;

  @Column('longtext')
  content: string;

  @Column({
    nullable: true,
    type: 'json',
  })
  action: ActionDto;

  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  createdAt: Date;
}
